/*
 * @Author: Leo.wang wanglizhigs@163.com
 * @Date: 2025-07-16 23:34:16
 * @LastEditors: Leo.wang wanglizhigs@163.com
 * @LastEditTime: 2025-07-17 00:08:10
 * @FilePath: /medical-companion-app/src/api/service.api.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { fileRequest, METHOD } from "@/service/http.service";
const {  VITE_API_URL } = import.meta.env;

export async function uploadFile(data = {}) {

  // const response = await fileRequest(`${VITE_API_URL}/upload`, {
  //   method: METHOD.POST,
  //   body: data,
  // })
  // return await response.json()  


  return fileRequest({
    url: "/upload",
    method: METHOD.POST,
    data
  }).then(({ data }) => data);
}
